<extend name="./App/Common/View/default/Base/common.html" />
<block name="main_content">
    <include file="./App/Common/View/default/Public/crumb.html" />
    <div class="mod">
        <div class="mod-head">
            <h3>
                <ul class="nav nav-tabs">
                    <li class="active">
                        <a href="{:U('Admin/Index/Homepagemanagement')}">导航管理</a>
                    </li>
                </ul>
            </h3>
        </div>
        <style>
        .aw-footer{
            display:none;
        }
        </style>
        <div class="tab-content mod-content">
            <div class="table-responsive">
                             <!--公众号搜索功能-->
                <style>
                   /* #jilu{
                        font-size: 13px;
                        line-height: 15px;
                    }*/
                   
                   input[placeholder],[placeholder],*[placeholder] {
                    color: #778899 !important;
                   }
                   
                   form {
                    margin: 0px;
                    display: inline
                   }                 
                   .search {
                    width: 200px;
                    height: 25px;
                    border-radius: 5px;
                    border: 1px solid #ccc;
                    padding-left: 10px;
                    box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075);
                   }                  
                </style>        
                <div class="commoun gt-cont">
                <div id="showdiv">
                <div id="msg">
                <table class="table table-striped">
                    <thead>
                    <tr>
                        <th style="width:5%">序号</th>
                        <th style="width:20%">名称</th>
                        <th style="width:20%">排序</th>
                        <th style="width:8%">操作</th>
                    </tr>
                    </thead>
                    <tbody>
                    <volist name="list" key="k" id="vo">
                        <tr>
                            <td>{$vo.id}</td>
                            <td>{$vo.name}</td>
                            <td>{$vo.order}</td>
                            <td>
                                <a href="{:U('edit',array('cid'=>$vo['id']))}"><img src="http://www.mobtop.com.cn/edit.gif" alt="" width='12px' height='12px'></a>  &nbsp;&nbsp; 
                            </td>
                        </tr>
                    </volist>
                    </tbody>
                </table>
                </div>
                </div>
                </div>
                
            </div>
        </div>
    </div>
</block>
<block name="script">
    <script>
    function delall(){
            if(confirm('你确定要删除多项吗？')){
                var id = document.getElementsByName("id");
                // bootAlert(own_id.length);
                var str = '';
                var lengths = id.length;
                for(var i=0;i<lengths;i++){  
                    if(id[i].checked)  
                    str+=id[i].value+',';   
                }
                // bootAlert(str);
                var postUrl = "{:U('Admin/Content/content_dele')}";
                $.post(postUrl,{'id':str},function(data){
                    if (data.status == 1) {
                        bootAlert(data.info);
                        window.location.href="{:U('Admin/Content/content')}";
                    } else {
                        bootAlert(data.info);
                    }
                });
                }
        }
        function del(obj) {
        var postUrl = "{:U('Admin/Content/content_deleone')}";
        if(confirm('你确定要删除吗？')) {
            $.post(postUrl, {
                "id": obj
            }, function(data) {
                if(data.status == 1) {
                    bootAlert(data.info);
                    window.location.href = "{:U('Admin/Content/content')}";
                } else {
                    bootAlert(data.info);
                }
            });
        }
    }
    $(".check-all").on('ifChecked', function (e)
        {
            // bootAlert(1);
            e.preventDefault();

            $(".icheckbox_square-blue").iCheck('check');
        });

        $(".check-all").on('ifUnchecked', function (e)
        {
            // bootAlert(0);
            e.preventDefault();

            $(".icheckbox_square-blue").iCheck('uncheck');

        });
        
        function gopage(){
            var page = $("#p").val();
            var postUrl = "{:U('Admin/Content/content')}";
            window.location.href='index.php?s=/Admin/Content/content/p/'+page;
        }
    </script>
</block>